#pragma once


// ActiveButton
namespace RealActiveButton
{
class CActiveButton : public CButton
{
	DECLARE_DYNAMIC(CActiveButton)

public:
	CActiveButton();
	virtual ~CActiveButton();

protected:
	DECLARE_MESSAGE_MAP()
	CBitmap m_bitmap;
	BOOL m_bHOver;

	BOOL m_bOneStatus;

	BOOL m_bTracking;
	BOOL m_bShowDisabled;
public:
	BOOL LoadBitmapFromResource(UINT nID, BOOL bShowDisabled = FALSE);
	BOOL LoadBitmapFromFile(LPCTSTR lpszFilename, BOOL bShowDisabled = FALSE);
	BOOL Load1StatusBitmapFromFile(LPCTSTR lpszFilename);
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	LRESULT OnMouseLeave(WPARAM wParam, LPARAM lParam);
	LRESULT OnMouseHOver(WPARAM wParam, LPARAM lParam);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
private:
	BOOL CopyBitmapFrom (CBitmap *pBitmap);
protected:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
protected:
	virtual void PreSubclassWindow();
};
};

